/*
 * @Author: zhangyun
 * @Date: 2021-04-27 13:39:35
 * @LastEditors: zhangyun
 * @LastEditTime: 2021-04-27 13:49:26
 * @Desc:
 */
const mongoose = require('../db/dbServer')

// schema
const articleSchema = new mongoose.Schema({
  img: { type: String, require: false },
  title: { type: String, require: true },
  time: { type: Date, require: true },
  detail: { type: String, require: false },
  creator: { type: String, require: true },
})
// model
const articleModel = mongoose.model('article', articleSchema)

module.exports = articleModel
